
#pragma once

#include <socket/socket.h>
#include <thread_pool/thread_pool.h>

#include <list>

class Server
{
public:
    Server();

    void Start();

private:
    bool onError(net::Listener& owner,const int v);
    bool onNewConnection(net::Listener& owner,net::Channel&& client);

    void DownLoad(net::Channel& client);
private:
    std::list<net::Channel> 
        mChannels;

    ThreadPool
        mThreadPool;
};
